package com.changli04.override.exer1;

public class Kids extends Mankind {
    int yearsOld;

    public Kids(int sex,int salary,int yearsOld) {
        this.yearsOld = yearsOld;
        setSex(sex);
        setSalary(salary);
    }
    public int getYearsOld() {
        return yearsOld;
    }

    public void setYearsOld(int yearsOld) {
        this.yearsOld = yearsOld;
    }
    @Override
    public void employee(){
        System.out.println("Kids should study and no job.");
    }

    public void printAge (){
        System.out.println(this.yearsOld);
    }
}
